﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsGame4
{
    public class ReversePriority : IComparable
    {
        private double priority;

        public ReversePriority(double priority)
        {
            this.priority = priority;
        }

        public int CompareTo(object obj)
        {
            ReversePriority castObj = obj as ReversePriority;
            if (castObj == null)
                throw new InvalidCastException();
            if (priority < castObj.priority)
                return 1;
            if (priority == castObj.priority)
                return 0;
            return -1;
        }
    }
}
